<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>已评论</title>

<!-- Favicons -->
<link rel="icon" th:href="@{assets/images/Shop.ico}">
<link rel="stylesheet" th:href="@{assets/css/vendor/vendor.min.css}">
<link rel="stylesheet" th:href="@{assets/css/plugins/plugins.min.css}">
<link rel="stylesheet" th:href="@{assets/css/style.min.css}">

<style>

    #div_body p {
        height: 40px;
        border: 1px solid #c0c0c0;
        line-height: 40px;
        text-align: center;
    }

    #div_body img {
        width: 18px;
        height: 18px;
        margin-top: 9px;
        float: right;
    }

    #div_body p:hover {
        background: #66b7f9;
        color: #ffffff;
    }

    .leftpage {
        height: 500px;
        background: #ffffff;
    }


    #adduse p {
        padding-left: 15px;
    }

    #adduse p:nth-child(2) {
        padding-top: 25px;
    }

    #adduse p:nth-child(6) {
        padding-bottom: 25px;
    }

</style>
<base th:href="@{/}">
</head>

<body>

<div th:include="head :: headname"></div>


<!-- Breadcrumb Section Start -->
<div class="section">
</div>
<!-- Breadcrumb Section End -->

    <!-- Breadcrumb Area Start -->
    <div class="breadcrumb-area bg-primary">
        <div class="container">
            <div class="breadcrumb-content">
                <ul>
                    <li>
                        <a th:href="@{/goods/index}"><i class="fa fa-home"></i> </a>
                    </li>
                    <li class="active">全部评论</li>
                </ul>
            </div>
        </div>
    </div>
    <!-- Breadcrumb Area End -->

</div>
<!-- Breadcrumb Section End -->

<!-- Shopping Cart Section Start 000 -->
<div class="section section-margin">
    <div class="container">

        <div class="row">
            <div class="col-lg-3" th:fragment="leafname">
                <!-- Sidebar Widget Start -->
                <aside class="sidebar_widget mt-10 mt-lg-0">
                    <div class="widget_inner">
                        <div class="widget-list mb-10">
                            <h3 class="widget-title mb-6">订单中心</h3>
                            <!-- Widget Menu Start -->
                            <nav>
                                <ul class="category-menu mb-n3">
                                    <li class="menu-item-has-children pb-4"><a th:href="@{order/allOrder}">全部订单 </a></li>
                                    <li class="menu-item-has-children pb-4"><a th:href="@{order/obligation}">待付款 </a></li>
                                    <li class="menu-item-has-children pb-4"><a th:href="@{order/received}">待收货 </a></li>
                                    <li class="menu-item-has-children pb-4"><a th:href="@{order/allcomment}">已评论 </a></li>
                                </ul>
                            </nav>
                            <!-- Widget Menu End -->
                        </div>
            <!--            <div class="widget-list mb-10">
                            <h3 class="widget-title mb-6">用户中心</h3>
                            <ul class="category-menu mb-n3">
                                <li class="menu-item-has-children pb-4">
                                    <a th:href="@{/user/personal/{id}(id=${userInfo.id})}" style="color: rgb(0, 196, 204)">个人信息
                                        <i class="fa fa-angle-left"></i></a></li>
                                <li class="menu-item-has-children pb-4">
                                    <a th:href="@{/user/accountSafe/{id}(id=${userInfo.id})}">账号安全
                                        <i class="fa fa-angle-right"></i></a></li>
                                <li class="menu-item-has-children pb-4"><a href="#">我的收藏
                                    <i class="fa fa-angle-right"></i></a></li>
                                <li class="menu-item-has-children pb-4">
                                    <a th:href="@{/user/addressBook/{id}(id=${userInfo.id})}">地址管理
                                        <i class="fa fa-angle-right"></i></a></li>
                                <li class="menu-item-has-children pb-4"><a href="#">优惠券
                                    <i class="fa fa-angle-right"></i></a></li>
                                <li class="menu-item-has-children pb-4"><a href="#">积分商城
                                    <i class="fa fa-angle-right"></i></a></li>
                            </ul>
                        </div>-->
                        <div class="widget-list">
                            <h3 class="widget-title mb-6">猜你喜欢</h3>

                            <div class="sidebar-body product-list-wrapper mb-n6">

                                <!-- Single Product List Start -->
                                <div class="single-product-list mb-6" th:each="re:${session.get('sList')}">
                                    <!-- Product List Thumb Start -->
                                    <div class="product">
                                        <div class="thumb">
                                            <a href="single-product.html" class="image">
                                                <img class="fit-image first-image" th:src="${re.pic}"
                                                     alt="Product Image">
                                                <!--                                    <img class="fit-image second-image"-->
                                                <!--                                         src="assets/images/products/small-product/10.jpg" alt="Product Image">-->
                                            </a>
                                        </div>
                                    </div>
                                    <!-- Product List Thumb End -->

                                    <!-- Product List Content Start -->
                                    <div class="product-list-content">
                                        <h6 class="product-name">
                                            <a href="single-product.html" th:text="${re.name}"></a>
                                        </h6>
                                        <span class="price">
                                                    <span class="new" th:text="'￥'+${re.promotionPrice}">$12.50</span>
                                            <span class="old" th:text="'￥'+${re.price}"></span>
                                            </span>
                                    </div>
                                    <!-- Product List Content End -->

                                </div>
                                <!-- Single Product List End -->



                            </div>
                        </div>
                    </div>
                </aside>
                <!-- Sidebar Widget End -->
            </div>

            <div class="col-9">
                <!-- Cart Table Start -->
                <div class="cart-table table-responsive">
                    <table class="table table-bordered">

                        <!-- Table Head Start -->
                        <thead>
                        <tr>
                            <th colspan="3">
                                <span><select
                                        style="outline: none;border: none;background-color: rgb(0,196,204);text-align: center"
                                        onchange="timeData(this)">
                                    <option th:if="${time}==0 " selected value="0">全部评论</option>
                                    <option th:if="${time}==2 " selected value="2">近3个月评论</option>
                                    <option th:if="${time}==1 " selected value="1">今年内</option>
                                    <option th:if="${time} ne 0 " value="0">全部评论</option>
                                    <option th:if="${time} ne 2 " value="2">近3个月评论</option>
                                    <option th:if="${time} ne 1" value="1">今年内</option>
                                </select></span>
                                      <span style="text-align:left;margin-left: 10px">评论列表</span>
                            </th>

                            <th class="pro-thumbnail">商品名称</th>
                            <th class="pro-price">评分</th>
                            <th style="width: 50px">价格</th>
                            <th class="pro-subtotal">操作</th>
                        </tr>
                        </thead>

                        <tbody th:each="var: ${comments}" th:with="index=${varStat.index}">
                        <tr>
                            <td colspan="7" style="height: 1px;border: none"></td>
                        </tr>
                        <tr style="background-color: rgb(0,196,204);">
                            <td colspan="7" style="text-align: left;color: white">
                                &emsp;时间：<span
                                    th:text="${#dates.format(var.getCreateTime(),'yyyy-MM-dd HH:mm:ss')}"></span></span>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;玩具商城logo
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3" class="pro-thumbnail">
                                <div th:if="${products!=null}" style="float: left;width: 100px"><a href="#">
                                    <img th:src="@{ ${products.get(index).pic} }"
                                         alt="Product" width="100"/> </a></div>&emsp;&emsp;&emsp;&emsp;&emsp;
                                &emsp;&emsp;<div style="width: 300px;margin-top: 25px"><a href="#" style="width: 200px">
                                <!--111-->
                                        <span th:text="${var.content.substring(0,9)}+'...'"
                                            style="display:inline-block;vertical-align: middle; text-overflow: ellipsis;white-space: normal;width: 100px"></span></a>
                                    </div>
                            </td>

                            <td><p style="width: 180px;text-overflow: ellipsis;white-space: normal"><a
                                    th:text="${var.productName}" href="#"></a></p></td>
                            <td class="pro-price" rowspan="1" th:text="${var.star}+'分'"></td>
                            <td class="pro-price" rowspan="1">￥
                                <span th:if="${products!=null}" th:text="${products.get(index).price}"> </span></td>

                            <td class="pro-subtotal" rowspan="1">
                                <p><a th:href="@{/order/comment(productId=${var.productId},id=${var.id})}"
                                      style="padding: 5px 10px 5px 10px;color: red;border: 1px solid red"
                                      oid="30">查看详情</a></p>

                            </td>

                        </tr>
                        </tbody>
                        <!-- Table Body End -->

                    </table>
                </div>

                <div class="row">
                    <div class="col-12">
                        <!--shop toolbar start-->
                        <div class="toolbar_wrapper mt-8 border-top pt-8">

                            <!-- Shopt Top Bar Right Start -->
                            <div class="blog-top-bar-right d-flex justify-content-center">
                                <nav>
                                    <ul class="pagination">
                                        <li class="page-item disabled upPage">
                                            <a class="page-link rounded-0" href="#" aria-label="Previous"
                                               style="border: 1px solid rgb(0,196,204)">
                                                <span aria-hidden="true">上一页</span>
                                            </a>
                                        </li>
                                        <li>
                                            <a class="page-link active" href="#"
                                               style="border: 1px solid rgb(0,196,204);border-left: none">...</a>
                                        </li>
                                        <li class="pageNum">
                                            <a class="page-link active pageNum" href="#"
                                               style="border: 1px solid rgb(0,196,204);border-left: none">1</a>
                                        </li>
                                        <li>
                                            <a class="page-link active" href="#"
                                               style="border: 1px solid rgb(0,196,204);border-left: none">...</a>
                                        </li>
                                        <li class="page-item">
                                            <a class="page-link rounded-0 nextPage" href="#" aria-label="Next"
                                               style="border: 1px solid rgb(0,196,204)">
                                                <span aria-hidden="true">下一页</span>
                                            </a>
                                        </li>
                                    </ul>
                                </nav>
                            </div>
                            <!-- Shopt Top Bar Right End -->

                        </div>
                        <!--shop toolbar end-->

                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
<!-- Shopping Cart Section End -->

<!-- Footer Section Start -->
<footer class="section footer-section">
    <!-- Footer Top Start -->
    <div class="footer-top bg-primary section-padding">
        <div class="container">
            <div class="row mb-n8">
                <div class="col-12 col-sm-6 col-lg-3 mb-8">
                    <div class="single-footer-widget">
                        <h1 class="widget-title">About Us</h1>
                        <p class="desc-content">We are a team of designers and developers that create high quality
                            wordpress, shopify, Opencart</p>
                        <!-- Soclial Link Start -->
                        <div class="widget-social justify-content-start mb-n2">
                            <a title="Facebook" href="#"><i class="fa fa-facebook-f"></i></a>
                            <a title="Twitter" href="#"><i class="fa fa-twitter"></i></a>
                            <a title="Linkedin" href="#"><i class="fa fa-linkedin"></i></a>
                            <a title="Youtube" href="#"><i class="fa fa-youtube"></i></a>
                            <a title="Vimeo" href="#"><i class="fa fa-vimeo"></i></a>
                        </div>
                        <!-- Social Link End -->
                    </div>
                </div>
                <div class="col-12 col-sm-6 col-lg-3 mb-8">
                    <div class="single-footer-widget">
                        <h2 class="widget-title">Contact Us</h2>
                        <ul class="contact-links">
                            <li><i class="pe-7s-home"></i> <span>Your address goes here</span></li>
                            <li><i class="pe-7s-mail"></i><a href="mailto:info@example.com"> info@example.com</a></li>
                            <li><i class="pe-7s-call"></i><a href="tel:+012-3456-789"> +012 3456 789</a></li>
                        </ul>
                    </div>
                </div>
                <div class="col-12 col-sm-6 col-lg-3 mb-8">
                    <div class="single-footer-widget aos-init aos-animate">
                        <h2 class="widget-title">Information</h2>
                        <ul class="widget-list">
                            <li><a href="contact.html">Terms &amp; Conditions</a></li>
                            <li><a href="contact.html">Payment Methode</a></li>
                            <li><a href="contact.html">Product Warranty</a></li>
                            <li><a href="contact.html">Return Process</a></li>
                            <li><a href="contact.html">Payment Security</a></li>
                        </ul>
                    </div>
                </div>
                <div class="col-12 col-sm-6 col-lg-3 mb-8">
                    <div class="single-footer-widget">
                        <h2 class="widget-title">Signup for newsletter</h2>
                        <div class="widget-body">
                            <!-- Newsletter Form Start -->
                            <div class="newsletter-form-wrap pt-1">
                                <form id="mc-form" class="mc-form" novalidate="true">
                                    <input type="email" id="mc-email" class="form-control email-box mb-4"
                                           placeholder="demo@example.com" name="EMAIL">
                                    <button id="mc-submit" class="newsletter-btn" type="submit">Subscribe</button>
                                </form>
                                <!-- mailchimp-alerts Start -->
                                <div class="mailchimp-alerts text-centre">
                                    <div class="mailchimp-submitting"></div><!-- mailchimp-submitting end -->
                                    <div class="mailchimp-success text-success"></div><!-- mailchimp-success end -->
                                    <div class="mailchimp-error text-danger"></div><!-- mailchimp-error end -->
                                </div>
                                <!-- mailchimp-alerts end -->
                            </div>
                            <!-- Newsletter Form End -->
                            <p class="desc-content mb-0">Join over 1,000 people who get free and fresh content delivered
                                automatically each time we publish</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Footer Top End -->

    <!-- Footer Bottom Start -->
    <div class="footer-bottom bg-secondary pt-4 pb-4">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-12 text-center">
                    <div class="copyright-content">
                        <p class="mb-0">Copyright © 2021.Company name All rights reserved.<a target="_blank"
                                                                                             href="https://sc.chinaz.com/moban/">网页模板</a>
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Footer Bottom End -->
</footer>
<!-- Footer Section End -->

<!-- Mobile Menu Start -->
<div class="mobile-menu-wrapper">
    <div class="offcanvas-overlay"></div>

    <!-- Mobile Menu Inner Start -->
    <div class="mobile-menu-inner">

        <!-- Button Close Start -->
        <div class="offcanvas-btn-close">
            <i class="pe-7s-close"></i>
        </div>
        <!-- Button Close End -->

        <!-- Mobile Menu Inner Wrapper Start -->
        <div class="mobile-menu-inner-wrapper">
            <!-- Mobile Menu Search Box Start -->
            <div class="search-box-offcanvas">
                <form>
                    <input class="search-input-offcanvas" type="text" placeholder="Search product...">
                    <button class="search-btn"><i class="pe-7s-search"></i></button>
                </form>
            </div>
            <!-- Mobile Menu Search Box End -->

            <!-- Mobile Menu Start -->
            <div class="mobile-navigation">
                <nav>
                    <ul class="mobile-menu">
                        <li class="has-children">
                            <a href="#">Home <i class="fa fa-angle-down"></i></a>
                            <ul class="dropdown" style="display: none;">
                                <li><a href="index.html">Home One</a></li>
                                <li><a href="index-2.html">Home Two</a></li>
                                <li><a href="index-3.html">Home Three</a></li>
                            </ul>
                        </li>
                        <li class="has-children">
                            <a href="#">Shop <i class="fa fa-angle-down" aria-hidden="true"></i></a>
                            <ul class="dropdown" style="display: none;">
                                <li><a href="shop.html">Shop Grid</a></li>
                                <li><a href="shop-left-sidebar.html">Shop Left Sidebar</a></li>
                                <li><a href="shop-right-sidebar.html">Shop Right Sidebar</a></li>
                                <li><a href="shop-list-fullwidth.html">Shop List Fullwidth</a></li>
                                <li><a href="shop-list-left-sidebar.html">Shop List Left Sidebar</a></li>
                                <li><a href="shop-list-right-sidebar.html">Shop List Right Sidebar</a></li>
                                <li><a href="obligation.html">Wishlist</a></li>
                                <li><a href="cart.html">Shopping Cart</a></li>
                                <li><a href="checkout.html">Checkout</a></li>
                                <li><a href="compare.html">Compare</a></li>
                            </ul>
                        </li>
                        <li class="has-children">
                            <a href="#">Product <i class="fa fa-angle-down" aria-hidden="true"></i></a>
                            <ul class="dropdown" style="display: none;">
                                <li><a href="single-product.html">Single Product</a></li>
                                <li><a href="single-product-sale.html">Single Product Sale</a></li>
                                <li><a href="single-product-group.html">Single Product Group</a></li>
                                <li><a href="single-product-normal.html">Single Product Normal</a></li>
                                <li><a href="single-product-affiliate.html">Single Product Affiliate</a></li>
                                <li><a href="single-product-slider.html">Single Product Slider</a></li>
                                <li><a href="single-product-gallery-left.html">Gallery Left</a></li>
                                <li><a href="single-product-gallery-right.html">Gallery Right</a></li>
                                <li><a href="single-product-tab-style-left.html">Tab Style Left</a></li>
                                <li><a href="single-product-tab-style-right.html">Tab Style Right</a></li>
                                <li><a href="single-product-sticky-left.html">Sticky Left</a></li>
                                <li><a href="single-product-sticky-right.html">Sticky Right</a></li>
                            </ul>
                        </li>
                        <li class="has-children">
                            <a href="#">Pages <i class="fa fa-angle-down" aria-hidden="true"></i></a>
                            <ul class="dropdown" style="display: none;">
                                <li><a href="about.html">About Us</a></li>
                                <li><a href="contact.html">Contact</a></li>
                                <li><a href="faq.html">Faq</a></li>
                                <li><a href="error-404.html">Error 404</a></li>
                                <li><a href="my-account.html">My Account</a></li>
                                <li><a href="login.html">Loging | Register</a></li>
                            </ul>
                        </li>
                        <li class="has-children">
                            <a href="#">Blog <i class="fa fa-angle-down" aria-hidden="true"></i></a>
                            <ul class="dropdown" style="display: none;">
                                <li><a href="blog.html">Blog</a></li>
                                <li><a href="blog-left-sidebar.html">Blog Left Sidebar</a></li>
                                <li><a href="blog-right-sidebar.html">Blog Right Sidebar</a></li>
                                <li><a href="blog-details.html">Blog Details</a></li>
                                <li><a href="blog-details-sidebar.html">Blog Details Sidebar</a></li>
                            </ul>
                        </li>
                        <li><a href="about.html">About</a></li>
                        <li><a href="contact.html">Contact</a></li>
                    </ul>
                </nav>
            </div>
            <!-- Mobile Menu End -->

            <!-- Language, Currency & Link Start -->
            <div class="offcanvas-lag-curr mb-6">
                <div class="header-top-lan-curr-link">
                    <div class="header-top-lan dropdown">
                        <h4 class="title">Language:</h4>
                        <button class="dropdown-toggle" data-bs-toggle="dropdown">English <i
                                class="fa fa-angle-down"></i></button>
                        <ul class="dropdown-menu dropdown-menu-right">
                            <li><a class="dropdown-item" href="#">English</a></li>
                            <li><a class="dropdown-item" href="#">Japanese</a></li>
                            <li><a class="dropdown-item" href="#">Arabic</a></li>
                            <li><a class="dropdown-item" href="#">Romanian</a></li>
                        </ul>
                    </div>
                    <div class="header-top-curr dropdown">
                        <h4 class="title">Currency:</h4>
                        <button class="dropdown-toggle" data-bs-toggle="dropdown">USD <i class="fa fa-angle-down"></i>
                        </button>
                        <ul class="dropdown-menu dropdown-menu-right">
                            <li><a class="dropdown-item" href="#">USD</a></li>
                            <li><a class="dropdown-item" href="#">Pound</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <!-- Language, Currency & Link End -->

            <!-- Contact Links/Social Links Start -->
            <div class="mt-auto bottom-0">

                <!-- Contact Links Start -->
                <ul class="contact-links">
                    <li><i class="fa fa-phone"></i><a href="#"> +012 3456 789</a></li>
                    <li><i class="fa fa-envelope-o"></i><a href="#"> info@example.com</a></li>
                    <li><i class="fa fa-clock-o"></i> <span>Monday - Sunday 9.00 - 18.00</span></li>
                </ul>
                <!-- Contact Links End -->

                <!-- Social Widget Start -->
                <div class="widget-social">
                    <a title="Facebook" href="#"><i class="fa fa-facebook-f"></i></a>
                    <a title="Twitter" href="#"><i class="fa fa-twitter"></i></a>
                    <a title="Linkedin" href="#"><i class="fa fa-linkedin"></i></a>
                    <a title="Youtube" href="#"><i class="fa fa-youtube"></i></a>
                    <a title="Vimeo" href="#"><i class="fa fa-vimeo"></i></a>
                </div>
                <!-- Social Widget Ende -->
            </div>
            <!-- Contact Links/Social Links End -->
        </div>
        <!-- Mobile Menu Inner Wrapper End -->

    </div>
</div>

<script src="assets/js/vendor.min.js"></script>
<script src="assets/js/plugins.min.js"></script>

<!--Main JS-->
<script src="assets/js/main.js"></script>

<script>
    function timeData(obj) {
        var time = obj.value;
        console.info(time);
        location.href = "/order/allcomment?time=" + time;
    }
</script>
<script>
    $(function () {
        $.ajax({
            url: '/order/allOrderList',
            type: "get",
            success: function (rel) {
                console.info(rel)
            }
        })
    })

</script>
</body>
</html>